xen.git
20 years agoxen/ia64 uaccess is still linux style with different declaration as
kaf24@firebug.cl.cam.ac.uk [Mon, 27 Feb 2006 15:22:02 +0000 (16:22 +0100)]
xen/ia64 uaccess is still linux style with different declaration as
common xen. It's meaningless to patch original file with many #ifdef
XEN, and so instead copy that file to create a new xen specific
uaccess file, with unused lines removed. May need render later.

Or else it breaks compilation on xen-unstable.

Signed-off-by Kevin Tian <kevin.tian@intel.com>

20 years agoFix a missed unmap in __entry().
kaf24@firebug.cl.cam.ac.uk [Mon, 27 Feb 2006 15:20:23 +0000 (16:20 +0100)]
Fix a missed unmap in __entry().
On x86_32p, after several creation/destroy of VMX domain, xen crashes
because we forget to unmap phys_table.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoWhile testing TCP & UDP tests (coming soon), I tracked down a bug in the
emellor@leeni.uk.xensource.com [Mon, 27 Feb 2006 15:14:11 +0000 (16:14 +0100)]
While testing TCP & UDP tests (coming soon), I tracked down a bug in the
IP addressing scheme
used by xm-test: each machine running network tests is using the same IP
addresses, so two machines
in the same network can cross-pollinate/interfere with each other's tests.

This patch changes the IP addressing scheme to add some randomness. It's
gone through a couple of dozen
passes of xm-test, some on -bridge and some on -route, while xm-test was
running on another box on the same network.

Signed-off-by: Jim Dykman <dykman@us.ibm.com>
20 years agoThe attached patch does the following:
emellor@leeni.uk.xensource.com [Mon, 27 Feb 2006 15:13:05 +0000 (16:13 +0100)]
The attached patch does the following:

- introduces two basic tests for the virtual TPM (skipped on hardware
where a TPM is not available or vtpm manager has not been started
manually before)
- adapts the Makefiles to make the test cases available
- splits up the hotplug files into two files where the vtpm-common.sh
can be sourced by 'other' scripts as well
- uses echo "$var" to return variables from functions
- gets rid of the 'set +e" work-around
- introduces a script (vtpm-delete) to delete entries from the virtual
TPM directory in /etc/xen/vtpm.db

The xm-tests will skip over the 2nd test on most systems and the patch
has otherwise no effect on existing tests.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
20 years agoThe attached patch breaks out
emellor@leeni.uk.xensource.com [Mon, 27 Feb 2006 15:11:01 +0000 (16:11 +0100)]
The attached patch breaks out

- log() function from xen-hotplug-common.sh -> logging.sh
- locking-related functions from xen-hotplug-common.sh  -> locking.sh

- xen-hotplug-common.sh 'sources' both those files now to not loose
these functions (which should make the break-out atomic)

- adapts the Makefile to install locking.sh and logging.sh at the right
place.

I ran the xm-tests over it and no (additional) errors appear due to this
change.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
20 years agoAdd a compile time option to enable domain 0 running in ring 0.
kaf24@firebug.cl.cam.ac.uk [Mon, 27 Feb 2006 14:52:43 +0000 (15:52 +0100)]
Add a compile time option to enable domain 0 running in ring 0.

In this mode only a single guest kernel is supported.

This mode only works for x86/32 (not x86/64).

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agomerge
Ian.Campbell@xensource.com [Mon, 27 Feb 2006 11:02:00 +0000 (11:02 +0000)]
merge

20 years agoList pae_pgdir_above_4gb in features for x86/32 Linux kernel.
Ian.Campbell@xensource.com [Mon, 27 Feb 2006 11:01:06 +0000 (11:01 +0000)]
List pae_pgdir_above_4gb in features for x86/32 Linux kernel.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
20 years agomerge.
Ian.Campbell@xensource.com [Mon, 27 Feb 2006 10:59:31 +0000 (10:59 +0000)]
merge.

20 years agoSupport XENFEAT_supervisor_mode_kernel in x86/64 HYPERVISOR_IRET macro
Ian.Campbell@xensource.com [Mon, 27 Feb 2006 10:58:17 +0000 (10:58 +0000)]
Support XENFEAT_supervisor_mode_kernel in x86/64 HYPERVISOR_IRET macro

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
20 years agoOnly panic() if the dom0 kernel requires an unknown feature flag.
Ian.Campbell@xensource.com [Mon, 27 Feb 2006 10:55:13 +0000 (10:55 +0000)]
Only panic() if the dom0 kernel requires an unknown feature flag.

It is acceptable for a guest kernel to support (but not require)
a feature which the hypervisor does not understand.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Mon, 27 Feb 2006 10:55:11 +0000 (11:55 +0100)]
Merged.

20 years agoFix non-xen build for: Make the fixmap area moveable in kernel address space.
cl349@firebug.cl.cam.ac.uk [Mon, 27 Feb 2006 10:34:03 +0000 (10:34 +0000)]
Fix non-xen build for: Make the fixmap area moveable in kernel address space.

From: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoAdd arch/i386/mm/pgtable.c to sparse tree.
cl349@firebug.cl.cam.ac.uk [Mon, 27 Feb 2006 10:31:30 +0000 (10:31 +0000)]
Add arch/i386/mm/pgtable.c to sparse tree.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoFix non-xen build for: Move the gate page (vsyscall) out of the fixmap area
cl349@firebug.cl.cam.ac.uk [Mon, 27 Feb 2006 10:27:57 +0000 (10:27 +0000)]
Fix non-xen build for: Move the gate page (vsyscall) out of the fixmap area
into user address space, just below PAGE_OFFSET.

From: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoAdd include/asm-i386/{fixmap,page}.h to sparse tree.
cl349@firebug.cl.cam.ac.uk [Mon, 27 Feb 2006 10:26:01 +0000 (10:26 +0000)]
Add include/asm-i386/{fixmap,page}.h to sparse tree.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoDefine strlcpy() in include/xen/string.h
kaf24@firebug.cl.cam.ac.uk [Mon, 27 Feb 2006 07:44:11 +0000 (08:44 +0100)]
Define strlcpy() in include/xen/string.h

Signed-off-by: Tsunehisa Doi <doi.tsunehisa@jp.fujitsu.com>
Signed-off-by: Kouya SHIMURA <kouya@jp.fujitsu.com>
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
20 years agoPeriodically sytnchronize Xen's wallclock time with NTP-synchronized time in domain0.
kaf24@firebug.cl.cam.ac.uk [Sun, 26 Feb 2006 15:38:59 +0000 (16:38 +0100)]
Periodically sytnchronize Xen's wallclock time with NTP-synchronized time in domain0.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoThe disk isn't guaranteed to be the first device in the config sxp --
kaf24@firebug.cl.cam.ac.uk [Sun, 26 Feb 2006 09:55:21 +0000 (10:55 +0100)]
The disk isn't guaranteed to be the first device in the config sxp --
make sure we can restart domains when using a boot loader even if not.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
20 years agopygrub currently takes a file on the command line to mean a config file
kaf24@firebug.cl.cam.ac.uk [Sun, 26 Feb 2006 09:54:06 +0000 (10:54 +0100)]
pygrub currently takes a file on the command line to mean a config file
if it can't figure out partitions and filesystems.  This then makes it
balloon to absurd sizes.  Make this only happen if you pass a debugging
flag

Signed-off-by: Jeremy Katz <katzj@redhat.com>
20 years agoInstead of using a static filename in the guest bootloader, use a random
kaf24@firebug.cl.cam.ac.uk [Sun, 26 Feb 2006 09:53:18 +0000 (10:53 +0100)]
Instead of using a static filename in the guest bootloader, use a random
filename so that multiple guests can start up simultaneously.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
20 years agoAdd 'console=xxx' to the Xen serial console section to make it obvious
kaf24@firebug.cl.cam.ac.uk [Sun, 26 Feb 2006 09:50:15 +0000 (10:50 +0100)]
Add 'console=xxx' to the Xen serial console section to make it obvious
that one might need to specify 'console=xxx' and not just 'comX=xxx'
if one isn't using the default com1,vga.

Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
20 years agoCross-compilation fixes (x86/64 on i386).
kaf24@firebug.cl.cam.ac.uk [Sun, 26 Feb 2006 09:42:07 +0000 (10:42 +0100)]
Cross-compilation fixes (x86/64 on i386).

Use strtoull to parse the final_exec_addr value from the command
line. Whe cross compiling on i386 for x86-64 unsigned long is 32 bit,
which leads to final_exec_addr being truncated to 32 bits by strtoul,
which leads to grub refusing to load the resulting image. Please
apply.

Use the target nm(1) when cross compiling to pick the _end address
from the Xen binary.

Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
20 years agoFix assertion.
kaf24@firebug.cl.cam.ac.uk [Sat, 25 Feb 2006 21:29:18 +0000 (22:29 +0100)]
Fix assertion.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoNew VCPUOP_register_runstate_memory_area hypercall. Avoids
kaf24@firebug.cl.cam.ac.uk [Sat, 25 Feb 2006 20:28:27 +0000 (21:28 +0100)]
New VCPUOP_register_runstate_memory_area hypercall. Avoids
need for a hypercall in the guest timer interrupt handler.

Cleaned up stolen/blocked tick handling in Linux.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoUpdate Linux time IRQ handler to understand the new stolen/blocked cycle counts
kaf24@firebug.cl.cam.ac.uk [Sat, 25 Feb 2006 19:07:28 +0000 (20:07 +0100)]
Update Linux time IRQ handler to understand the new stolen/blocked cycle counts
exported by Xen. This is based heavily on a patch from Rik van Riel, but
extended to distinguish between idle/blocked cycles and stolen cycles.

There is still stuff todo:
 1. Xen should export the time values in shared memory, to save a hypercall
    on every time interrupt (even though that is only every 10ms, worst case).
 2. As in s390, Xen's cputime_t should be measured at finer granularity than
    jiffies. Nanoseconds would be a better unit.
 3. Break out the internals of the account_steal_time() interface so that we don't
    need to abuse it so wretchedly.

Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoNew VCPUOP_get_runstate_info hypercall. Returns information about the current
kaf24@firebug.cl.cam.ac.uk [Sat, 25 Feb 2006 16:58:37 +0000 (17:58 +0100)]
New VCPUOP_get_runstate_info hypercall. Returns information about the current
run state of a VCPU (running, runnable, blocked, etc.) and the total time
spent in each state since the VCPU was created.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAvoid pcnet dm packet loss / corruption.
kaf24@firebug.cl.cam.ac.uk [Sat, 25 Feb 2006 11:27:53 +0000 (12:27 +0100)]
Avoid pcnet dm packet loss / corruption.

Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
20 years agoSplit XENFEAT_ feature flags into new header file features.h.
kaf24@firebug.cl.cam.ac.uk [Fri, 24 Feb 2006 18:34:54 +0000 (19:34 +0100)]
Split XENFEAT_ feature flags into new header file features.h.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix up CPU allocation and topology reporting.
kaf24@firebug.cl.cam.ac.uk [Fri, 24 Feb 2006 18:16:52 +0000 (19:16 +0100)]
Fix up CPU allocation and topology reporting.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoQuieten down MSR access warnings.
kaf24@firebug.cl.cam.ac.uk [Fri, 24 Feb 2006 18:16:15 +0000 (19:16 +0100)]
Quieten down MSR access warnings.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoDefault minimum number of receive buffers queued by netfront is now 64, not 8.
kaf24@firebug.cl.cam.ac.uk [Fri, 24 Feb 2006 16:50:20 +0000 (17:50 +0100)]
Default minimum number of receive buffers queued by netfront is now 64, not 8.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoBring up AP of VMX domain.
kaf24@firebug.cl.cam.ac.uk [Fri, 24 Feb 2006 16:32:58 +0000 (17:32 +0100)]
Bring up AP of VMX domain.
1) add INIT-SIPI-SIPI IPI sequence handling code to HVM virtual lapic
code.
2) add an new interface init_ap_context to hvm_funcs, and implement the
VMX side.
3) add a hvm generic function hvm_bringup_ap, which in turn calls
init_ap_context.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
20 years agoClean up p2m functions.
kaf24@firebug.cl.cam.ac.uk [Fri, 24 Feb 2006 16:32:19 +0000 (17:32 +0100)]
Clean up p2m functions.
1) set_p2m_entry/alloc_p2m_table call domain_crash instead of
domain_crash_synchronous when map_p2m_entry return with failure, or dom0
will crash.
2) free_p2m_table now uses domain as parameter instead of vcpu.
3) add AP p2m initialization logic for VMX domain.
And some coding style cleanups.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoTwo missing exports (one of them needed only for PAE) prevented netfront from being...
kaf24@firebug.cl.cam.ac.uk [Fri, 24 Feb 2006 16:25:41 +0000 (17:25 +0100)]
Two missing exports (one of them needed only for PAE) prevented netfront from being built as a module.

From: Jan Beulich

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAnother tiny C89 fix.
kaf24@firebug.cl.cam.ac.uk [Fri, 24 Feb 2006 15:37:09 +0000 (16:37 +0100)]
Another tiny C89 fix.

Signed-off-by: Bruce Rogers <brogers@novell.com>
20 years agolinux-i386: cleanup head.S, sync default_ldt and {new,boot}_cpu_data with native.
cl349@firebug.cl.cam.ac.uk [Fri, 24 Feb 2006 14:41:45 +0000 (14:41 +0000)]
linux-i386: cleanup head.S, sync default_ldt and {new,boot}_cpu_data with native.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoImplement direct iret to guest kernel where possible in HYPERVISOR_IRET macro.
Ian.Campbell@xensource.com [Fri, 24 Feb 2006 11:05:52 +0000 (11:05 +0000)]
Implement direct iret to guest kernel where possible in HYPERVISOR_IRET macro.

Returns to guest userspace and from an NMI must still go via the hypervisor.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
20 years agoTools changes for per-vcpu io event channel on IA64.
kaf24@firebug.cl.cam.ac.uk [Fri, 24 Feb 2006 09:29:09 +0000 (10:29 +0100)]
Tools changes for per-vcpu io event channel on IA64.

Signed-off-by Kevin Tian <Kevin.tian@intel.com>

20 years agoReturn <4GB memory back to Xen when destroying a PAE pgdir.
kaf24@firebug.cl.cam.ac.uk [Fri, 24 Feb 2006 07:49:32 +0000 (08:49 +0100)]
Return <4GB memory back to Xen when destroying a PAE pgdir.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoThis patch allows for compilation with C89 era compilers, by removing the
kaf24@firebug.cl.cam.ac.uk [Fri, 24 Feb 2006 07:28:04 +0000 (08:28 +0100)]
This patch allows for compilation with C89 era compilers, by removing the
trailing comma from an enum, which was not part of the C89 spec.

Signed-off-by: Bruce Rogers <brogers@novell.com>
20 years agoCset 8950 adds shadow info dump in common code, however
kaf24@firebug.cl.cam.ac.uk [Fri, 24 Feb 2006 07:27:05 +0000 (08:27 +0100)]
Cset 8950 adds shadow info dump in common code, however
IA64 has no shadow mode. Move it into arch specific stub instead.

Signed-off-by Kevin Tian <kevin.tian@intel.com>

20 years agoUse common IRET macro for all exits from XenLinux. Currently
kaf24@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 17:40:08 +0000 (18:40 +0100)]
Use common IRET macro for all exits from XenLinux. Currently
uses slow iret path every time (but most returns will do that
anyway, since they'll be to userspace). Fast return (to kernel)
can be implemented inside the macro and respect the
supervisor_mode_kernel feature flag.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemove TBF_SLOW_IRET hack from x86/64 Xen return-to-guest
kaf24@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 17:30:43 +0000 (18:30 +0100)]
Remove TBF_SLOW_IRET hack from x86/64 Xen return-to-guest
path. Guest should set up flags for itself in its own
NMI handler.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemove explicit munging of selector RPLs from Xen Linux x86/64.
kaf24@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 17:27:18 +0000 (18:27 +0100)]
Remove explicit munging of selector RPLs from Xen Linux x86/64.
Not needed now it's done by Xen.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoinitialize few structure fully to zero with talloc_zero
vhanquez@kneesa.uk.xensource.com [Thu, 23 Feb 2006 17:14:55 +0000 (17:14 +0000)]
initialize few structure fully to zero with talloc_zero
instead of explicitely initializing some fields to NULL.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoOutput which shadow mode is used, if any.
cl349@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 16:29:06 +0000 (16:29 +0000)]
Output which shadow mode is used, if any.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoMake the fixmap area moveable in kernel address space.
cl349@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 15:59:54 +0000 (15:59 +0000)]
Make the fixmap area moveable in kernel address space.

From: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoMove the gate page (vsyscall) out of the fixmap area into user address space,
cl349@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 15:22:19 +0000 (15:22 +0000)]
Move the gate page (vsyscall) out of the fixmap area into user address space,
just below PAGE_OFFSET.

From: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoAdd include/asm-i386/{a.out,elf}.h to sparse tree
cl349@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 15:22:17 +0000 (15:22 +0000)]
Add include/asm-i386/{a.out,elf}.h to sparse tree

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoAdd XENFEAT feature parsing to the domain 0 builder in Xen.
kaf24@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 14:55:35 +0000 (15:55 +0100)]
Add XENFEAT feature parsing to the domain 0 builder in Xen.
Fail to boot if domain 0 requires features that Xen does not
understand or support (for domain 0).

Remove stale dom0_translate boot option.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemove some unnecessary diffs vs. native Linux. We now don't use the Xen
kaf24@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 14:33:08 +0000 (15:33 +0100)]
Remove some unnecessary diffs vs. native Linux. We now don't use the Xen
FLAT_foo segment selectors at all.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix netfront receive path for auto_translate_physmap mode.
kaf24@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 14:22:12 +0000 (15:22 +0100)]
Fix netfront receive path for auto_translate_physmap mode.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoDisable pagetable pinning for shadow-mode-refcount guests.
kaf24@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 13:50:00 +0000 (14:50 +0100)]
Disable pagetable pinning for shadow-mode-refcount guests.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoClean up segment selector fixup and validation.
kaf24@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 13:43:45 +0000 (14:43 +0100)]
Clean up segment selector fixup and validation.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRename XENFEAT_ring0_kernel to slightly more generic XENFEAT_supervisor_mode_kernel.
kaf24@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 10:59:27 +0000 (11:59 +0100)]
Rename XENFEAT_ring0_kernel to slightly more generic XENFEAT_supervisor_mode_kernel.
Add comments in public header version.h to explain what all the different
feature flags mean. Add a new flag XENFEAT_pae_pgdir_above_4gb to inform the guest
that its PAE page directories do not need to conform to the usual hardware
restriction.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoSilenty ignore calls to xen_create_contiguous_region() when running
kaf24@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 10:42:19 +0000 (11:42 +0100)]
Silenty ignore calls to xen_create_contiguous_region() when running
in auto_translated_physmap mode. A new comment in that function explains
why this is an okay thing to do.

This avoids an unnecessary crash in Xen's skbuff_ctor.

Signed-off-by: Michael Vrable <mvrable@cs.ucsd.edu>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoClean up some vmx code.
kaf24@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 10:34:11 +0000 (11:34 +0100)]
Clean up some vmx code.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoWhenever the slice of a domU is set to 0, sedf_adjdom() sets extraweight
kaf24@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 10:31:01 +0000 (11:31 +0100)]
Whenever the slice of a domU is set to 0, sedf_adjdom() sets extraweight
to 0.  Later, in desched_extra_dom(), if the extrawight is not set, the
vcpu's score is calculated with this:

 /*domain was running in L1 extraq => score is inverse of
   utilization and is used somewhat incremental!*/
   if ( !inf->extraweight )
       /*NB: use fixed point arithmetic with 10 bits*/
       inf->score[EXTRA_UTIL_Q] = (inf->period << 10) /
           inf->slice;

Which can result in a divide by zero.

This changeset adds a comments and additional sanity check to prevent this
case from crashing Xen.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
20 years agoUpdate the hypercalls in Mini-OS to reflect the current state in XenLinux.
kaf24@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 10:27:35 +0000 (11:27 +0100)]
Update the hypercalls in Mini-OS to reflect the current state in XenLinux.

Signed-off-by: Aravindh Puthiyaparambil <aravindh.puthiyaparambil@unisys.com>
20 years agoPer-vcpu IO evtchn support for VT-i guests (ia64).
kaf24@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 10:24:37 +0000 (11:24 +0100)]
Per-vcpu IO evtchn support for VT-i guests (ia64).

Signed-off-by Kevin Tian <kevin.tian@intel.com>
Signed-off-by Xin Li <xin.b.li@intel.com>

20 years agoPer-vcpu IO evtchn patch for HVM domain.
kaf24@firebug.cl.cam.ac.uk [Thu, 23 Feb 2006 10:22:25 +0000 (11:22 +0100)]
Per-vcpu IO evtchn patch for HVM domain.
We are starting to send patches to support SMP VMX guest.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoAdding a second IP address onto eth0 causes the vif-* hotplug scripts to
emellor@leeni.uk.xensource.com [Wed, 22 Feb 2006 20:52:30 +0000 (21:52 +0100)]
Adding a second IP address onto eth0 causes the vif-* hotplug scripts to
fail: ip_of() is returning a LIST of IP addresses, one per line.
The vif-scripts attempt to use the list where single addresses ought to
be, with predictable results. This patch changes ip_of() to return
the first address in the list, which seems to be the first one configured.

Signed-off-by: Jim Dykman <dykman@us.ibm.com>
20 years agoAdd feature flag allowing guest kernel to run in domain 0.
Ian.Campbell@xensource.com [Wed, 22 Feb 2006 19:11:23 +0000 (19:11 +0000)]
Add feature flag allowing guest kernel to run in domain 0.

To support this we give kernel GDT entries DPL=0 and use kernel
segment selectors with RPL=0. Xen will crunch these to ring 1 when
they are passed in. When a segment selector is used directly or placed
in a stack frame the guest OS is reponsible for crunching the RPL.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
20 years agoCset 8916 missed two extra pages for VT-i domain and thus breaks domain
kaf24@firebug.cl.cam.ac.uk [Wed, 22 Feb 2006 18:40:19 +0000 (19:40 +0100)]
Cset 8916 missed two extra pages for VT-i domain and thus breaks domain
creation. This fixes it.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
20 years agoFix gcc warning and clean a piece of code in arch_set_info_guest to avoid
kaf24@firebug.cl.cam.ac.uk [Wed, 22 Feb 2006 18:38:50 +0000 (19:38 +0100)]
Fix gcc warning and clean a piece of code in arch_set_info_guest to avoid
AP of HVM domain going to a wrong code path.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoChange shadow_direct_map_init/clean param from vcpu to domain.
kaf24@firebug.cl.cam.ac.uk [Wed, 22 Feb 2006 18:23:35 +0000 (19:23 +0100)]
Change shadow_direct_map_init/clean param from vcpu to domain.
Also some cleanups.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoFix x86_64 Xen build.
Ian.Campbell@xensource.com [Wed, 22 Feb 2006 17:26:39 +0000 (17:26 +0000)]
Fix x86_64 Xen build.

event_callback_cs and failsafe_callback_cs are x86_32 only.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
20 years agoDon't reload segment registers -- it's done later in generic code.
cl349@firebug.cl.cam.ac.uk [Wed, 22 Feb 2006 15:50:28 +0000 (15:50 +0000)]
Don't reload segment registers -- it's done later in generic code.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoMove lgdt_finish inline
Ian.Campbell@xensource.com [Wed, 22 Feb 2006 15:17:04 +0000 (15:17 +0000)]
Move lgdt_finish inline

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
20 years agoList supported feature flags in __xen_guest section.
Ian.Campbell@xensource.com [Wed, 22 Feb 2006 15:16:44 +0000 (15:16 +0000)]
List supported feature flags in __xen_guest section.

Signed-off-bu: Ian Campbell <Ian.Campbell@XenSource.com>

20 years agoValidate the segment selectors passed to arch_set_info_guest().
Ian.Campbell@xensource.com [Wed, 22 Feb 2006 15:13:48 +0000 (15:13 +0000)]
Validate the segment selectors passed to arch_set_info_guest().

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
20 years agoAllow Xen to truncate x86_32 segment limits to the correct value
Ian.Campbell@xensource.com [Wed, 22 Feb 2006 15:13:08 +0000 (15:13 +0000)]
Allow Xen to truncate x86_32 segment limits to the correct value
rather than hardcoding them in each guest kernel.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
20 years agoXM-Test takes a really long time to build the initrd it uses for testing. This patch...
pl@us.ibm.com [Wed, 22 Feb 2006 15:02:54 +0000 (16:02 +0100)]
XM-Test takes a really long time to build the initrd it uses for testing.  This patch to the Makefile allows you to specify INITRD="url" when running make existing to make it download a prebuilt copy of the initrd from a repository.

Signed-off-by: Paul Larson <pl@us.ibm.com>
20 years agoWhen thermal interrupt happened when vmx guest is running,
kaf24@firebug.cl.cam.ac.uk [Wed, 22 Feb 2006 08:54:20 +0000 (09:54 +0100)]
When thermal interrupt happened when vmx guest is running,
smp_thermal_interrupt() should be called.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
20 years agoFix HVM x86-32 PAE guest support on 64-bit Xen.
kaf24@firebug.cl.cam.ac.uk [Wed, 22 Feb 2006 08:53:54 +0000 (09:53 +0100)]
Fix HVM x86-32 PAE guest support on 64-bit Xen.

Signed-off-by: Xiaohui Xin < xiaohui.xin@intel.com>
20 years agoFix SVM instruction decode, fixing problem with gfxboot package.
kaf24@firebug.cl.cam.ac.uk [Tue, 21 Feb 2006 18:36:00 +0000 (19:36 +0100)]
Fix SVM instruction decode, fixing problem with gfxboot package.

Signed-off-by: Tom Woller <thomas.woller@amd.com>
20 years agoFix 64b build breakage.
kaf24@firebug.cl.cam.ac.uk [Tue, 21 Feb 2006 18:35:34 +0000 (19:35 +0100)]
Fix 64b build breakage.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoinst_len in HVM mmio handler must be a signed variable, as
kaf24@firebug.cl.cam.ac.uk [Tue, 21 Feb 2006 18:32:15 +0000 (19:32 +0100)]
inst_len in HVM mmio handler must be a signed variable, as
it may hold an error return value (from hvm_instruction_length).

Signed-off-by: Tom Woller <thomas.woller@amd.com>
20 years agoDefine constants for XENVER char array sizes. Allows Linux
kaf24@firebug.cl.cam.ac.uk [Tue, 21 Feb 2006 17:29:28 +0000 (18:29 +0100)]
Define constants for XENVER char array sizes. Allows Linux
users to avoid using the typedefs directly.

Signed-off-by: Mike Day <ncmike@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoCleanups to tools since HVM domain P2M table and 1-1 table are built in xen.
kaf24@firebug.cl.cam.ac.uk [Tue, 21 Feb 2006 17:23:35 +0000 (18:23 +0100)]
Cleanups to tools since HVM domain P2M table and 1-1 table are built in xen.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoFix cleanup path if an HVM guest fails very early, before direct map is built.
kaf24@firebug.cl.cam.ac.uk [Tue, 21 Feb 2006 17:21:13 +0000 (18:21 +0100)]
Fix cleanup path if an HVM guest fails very early, before direct map is built.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoNo need for save_segments() on HVM 64b guest.
kaf24@firebug.cl.cam.ac.uk [Tue, 21 Feb 2006 17:19:16 +0000 (18:19 +0100)]
No need for save_segments() on HVM 64b guest.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoAdd PAE option to HVM config file.
kaf24@firebug.cl.cam.ac.uk [Tue, 21 Feb 2006 17:15:49 +0000 (18:15 +0100)]
Add PAE option to HVM config file.
This option is disabled by default, only if we have "pae=1" in config
file, cpuid will return PAE available to VMX guest, and Linux PAE VMX
guest need this. Once the PAE VMX guest support is stable, we will
enable it by default.

Signed-off-by: Xin Li <xin.b.li@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
20 years agotpm: Fixes and cleanup
cl349@firebug.cl.cam.ac.uk [Tue, 21 Feb 2006 17:13:30 +0000 (17:13 +0000)]
tpm: Fixes and cleanup
Fix a recently found problem in tpm.c, move the vtpm sysfs
entry to /sys/device/platform/tpm_vtpm and add locking in
the vtpm hotplug script.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
20 years agoUpdate ia64 sparse tree to Linux 2.6.16-rc4.
cl349@firebug.cl.cam.ac.uk [Tue, 21 Feb 2006 16:25:56 +0000 (16:25 +0000)]
Update ia64 sparse tree to Linux 2.6.16-rc4.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
20 years agoUpdate to Linux 2.6.16-rc4.
cl349@firebug.cl.cam.ac.uk [Tue, 21 Feb 2006 11:19:13 +0000 (11:19 +0000)]
Update to Linux 2.6.16-rc4.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
--HG--
rename : patches/linux-2.6.16-rc3/i386-mach-io-check-nmi.patch => patches/linux-2.6.16-rc4/i386-mach-io-check-nmi.patch
rename : patches/linux-2.6.16-rc3/net-csum.patch => patches/linux-2.6.16-rc4/net-csum.patch
rename : patches/linux-2.6.16-rc3/pmd-shared.patch => patches/linux-2.6.16-rc4/pmd-shared.patch
rename : patches/linux-2.6.16-rc3/smp-alts.patch => patches/linux-2.6.16-rc4/smp-alts.patch

20 years agolinux-i386: Fix CONFIG_X86_NO_TSS and CONFIG_X86_SYSENTER.
cl349@firebug.cl.cam.ac.uk [Mon, 20 Feb 2006 23:01:50 +0000 (23:01 +0000)]
linux-i386: Fix CONFIG_X86_NO_TSS and CONFIG_X86_SYSENTER.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agolinux-i386: Cleanup stack pointer initialization at start of day.
cl349@firebug.cl.cam.ac.uk [Mon, 20 Feb 2006 20:26:24 +0000 (20:26 +0000)]
linux-i386: Cleanup stack pointer initialization at start of day.

From: Jan Beulich <JBeulich@novell.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoSuppress VIDEO_SELECT config option.
cl349@firebug.cl.cam.ac.uk [Mon, 20 Feb 2006 18:03:56 +0000 (18:03 +0000)]
Suppress VIDEO_SELECT config option.
The Xen guest doesn't know how to change video modes at boot.

From: Jan Beulich <JBeulich@novell.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoAdd drivers/video/Kconfig to sparse tree.
cl349@firebug.cl.cam.ac.uk [Mon, 20 Feb 2006 18:02:55 +0000 (18:02 +0000)]
Add drivers/video/Kconfig to sparse tree.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoFix I/O port address for first floppy controller on x86_64.
cl349@firebug.cl.cam.ac.uk [Mon, 20 Feb 2006 17:59:41 +0000 (17:59 +0000)]
Fix I/O port address for first floppy controller on x86_64.
As a consequence, some of the i386 changes over native code need to also be
added to x86-64.

From: Jan Beulich <JBeulich@novell.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoFix read_cr3() and use it.
cl349@firebug.cl.cam.ac.uk [Mon, 20 Feb 2006 17:34:21 +0000 (17:34 +0000)]
Fix read_cr3() and use it.

From: Jan Beulich <JBeulich@novell.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoEliminate x86_64 idt_table.
cl349@firebug.cl.cam.ac.uk [Mon, 20 Feb 2006 17:32:29 +0000 (17:32 +0000)]
Eliminate x86_64 idt_table.
Add CONFIG_X86_NO_IDT to exclude all code which references the idt table.
Also fix the non-Xen cpu_gdt_init() handling.

From: Jan Beulich <JBeulich@novell.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoEliminate i386 idt_table.
cl349@firebug.cl.cam.ac.uk [Mon, 20 Feb 2006 17:22:00 +0000 (17:22 +0000)]
Eliminate i386 idt_table.
Add CONFIG_X86_NO_IDT to exclude all code which references the idt table.
Make CONFIG_X86_F00F_BUG conditional on CONFIG_X86_NO_IDT.

From: Jan Beulich <JBeulich@novell.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoAdd arch/i386/Kconfig.cpu to sparse tree.
cl349@firebug.cl.cam.ac.uk [Mon, 20 Feb 2006 17:15:14 +0000 (17:15 +0000)]
Add arch/i386/Kconfig.cpu to sparse tree.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agodo not BUG() if memory cannot be allocated, just wait.
vhanquez@kneesa.uk.xensource.com [Mon, 20 Feb 2006 17:14:19 +0000 (17:14 +0000)]
do not BUG() if memory cannot be allocated, just wait.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoalloc_netdev must be freed with free_netdev, not directly by kfree.
vhanquez@kneesa.uk.xensource.com [Mon, 20 Feb 2006 17:06:36 +0000 (17:06 +0000)]
alloc_netdev must be freed with free_netdev, not directly by kfree.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoSimplify utoa macro, make it identical with x86_64 version.
cl349@firebug.cl.cam.ac.uk [Mon, 20 Feb 2006 16:49:35 +0000 (16:49 +0000)]
Simplify utoa macro, make it identical with x86_64 version.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoEliminate hard coded items from x86_64 __xen_guest section
cl349@firebug.cl.cam.ac.uk [Mon, 20 Feb 2006 16:42:54 +0000 (16:42 +0000)]
Eliminate hard coded items from x86_64 __xen_guest section
to avoid problems when the position of the hypercall page changes.
Further, clean up many things to avoid needless differences to native
code, while also adding a couple of adjustments that only will be
submitted for native code inclusion, that simplify code, or that
remove unused elements.

From: Jan Beulich <JBeulich@novell.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>